Upstream version 11.40.271.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / resources / hotword / logging.js
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 cr.define('hotword', function() {
6   'use strict';
7
8   /**
9    * Wrapper around console.log allowing debug log message to be enabled during
10    * development.
11    * @param {...*} varArgs
12    */
13   function debug(varArgs) {
14     if (hotword.DEBUG || window.localStorage['hotword.DEBUG'])
15       console.log.apply(console, arguments);
16   }
17
18   return {
19     DEBUG: false,
20     debug: debug
21   };
22 });