Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?

サーバーサイドに比べて見落とされがちな、フロントエンドのエラーログ収集。JavaScriptのログ収集、確認に役立つ手法、ツール、ライブラリーを総まとめ。 開発進行中も本番モードでの運用時も、ソフトウェアアプリケーションにおいてロギングは大切です。 サーバーを運用しているなら、サーバーサイドの言語選択にかかわりなく無数のライブラリーを利用でき、広範に及ぶストレージメカニズムやログ出力を扱う際の各種ツールも使えます。 しかし、クライアント側アプリケーションとなるとロギングは見過ごされがちで、利用できる手法もかなり限られています。 この記事ではクライアント側アプリケーション、特にJavaScriptを中心としたシングルページアプリケーション(SPA)におけるロギングの実装方法を紹介します。 コンソール エラーとメッセージのロギング方法でもっとも一般的かつ分かりやすいのは、おそらくコンソールの使
We’ve been working with Node.js for several years at Good Eggs and love the JavaScript ecosystem, particularly the advancement of the language itself with ECMAScript 6. While the number of options in the JavaScript ecosystem is still exploding, it does feel like we are starting to narrow in on a great toolset. Today, all our new applications are using ES6 and ReactJS and it feels right. Below I sh
Much of time of developers spent on fixing problems. When it comes to fixes, one need to be good and fast at debugging. Debugging is part of programming. It’s very difficult to write efficient JavaScript code without debugging. You must diagnose into code to find an actual root cause. In the era of IE, most of the programmer debug using alert. But now a day’s many methods and tools added into brow
console.log関連についてまとめました。 モダンブラウザであればどれも使用できると思いますが、基本出力結果等はchromeで確認したものです。 console.hogehogeのいろいろ console.log 基本 引数を入れることで出力結果をカスタマイズできます console.info、console.warn、console.error それぞれで見た目を変えることができます。 console.assert 式を評価してfalseの場合にログ出力します。 console.count ログの出力結果が同じ場合にカウント数が自動的に増えていきます。 console.dir オブジェクトのプロパティの中身をログに出力します。 console.dirxml HTMLとかXMLの要素を渡すと、下の要素が全部見れるようになります。 console.group、conosle.group
(function () { 'use strict'; // ログのスタイル var logStyles = { timestamp: { color: 'gray' }, label: { color: 'white', 'border-radius': '2px' }, event: { color: 'blue', 'font-weight': 'bold', 'font-size': '110%' } }; // ラベルの色 var labelColors= { Model: 'red', Collection: 'purple', View: 'green', Router: 'black' }; function debugEvents(parts) { return function (prefix) { this.__debugEvents = this.__debugE
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く