summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/cryptotoken/logging.js
blob: 9054731e8e9eb9da2ffae81727479048c2cafa25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

/**
 * @fileoverview Logging related utility functions.
 */

/** Posts the log message to the log url.
 * @param {string} logMsg the log message to post.
 * @param {string=} opt_logMsgUrl the url to post log messages to.
 */
function logMessage(logMsg, opt_logMsgUrl) {
  console.warn(UTIL_fmt('logMessage("' + logMsg + '")'));

  if (!opt_logMsgUrl) {
    return;
  }

  var audio = new Audio();
  audio.src = opt_logMsgUrl + logMsg;
}