Skip to content

Commit

Permalink
Release version v1.6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
pimterry committed Nov 7, 2019
1 parent 014e9fc commit 08441fc
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ v1.6.3 - Avoid TypeScript type conflicts with other global `log` types (e.g. `co

v1.6.4 - Ensure package.json's 'main' is a fully qualified path, to fix webpack issues

v1.6.5 - Ensure the provided message is included when calling trace() in IE11

## License
Copyright (c) 2013 Tim Perry
Licensed under the MIT license.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "loglevel",
"version": "1.6.4",
"version": "1.6.5",
"main": "dist/loglevel.min.js",
"dependencies": {},
"ignore": [
Expand Down
14 changes: 13 additions & 1 deletion dist/loglevel.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! loglevel - v1.6.4 - https://github.com/pimterry/loglevel - (c) 2019 Tim Perry - licensed MIT */
/*! loglevel - v1.6.5 - https://github.com/pimterry/loglevel - (c) 2019 Tim Perry - licensed MIT */
(function (root, definition) {
"use strict";
if (typeof define === 'function' && define.amd) {
Expand All @@ -14,6 +14,10 @@
// Slightly dubious tricks to cut down minimized file size
var noop = function() {};
var undefinedType = "undefined";
var isIE = (
window.navigator.userAgent.indexOf('Trident/') >= 0 ||
window.navigator.userAgent.indexOf('MSIE ') >= 0
);

var logMethods = [
"trace",
Expand All @@ -40,6 +44,12 @@
}
}

// Trace() doesn't print the message in IE, so for that case we need to wrap it
function traceForIE() {
if (console.log) console.log.apply(console, arguments);
if (console.trace) console.trace();
}

// Build the best logging method possible for this env
// Wherever possible we want to bind, not wrap, to preserve stack traces
function realMethod(methodName) {
Expand All @@ -49,6 +59,8 @@

if (typeof console === undefinedType) {
return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives
} else if (methodName === 'trace' && isIE) {
return traceForIE;
} else if (console[methodName] !== undefined) {
return bindMethod(console, methodName);
} else if (console.log !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions dist/loglevel.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "loglevel",
"description": "Minimal lightweight logging for JavaScript, adding reliable log level methods to any available console.log methods",
"version": "1.6.4",
"version": "1.6.5",
"homepage": "https://github.com/pimterry/loglevel",
"author": {
"name": "Tim Perry",
Expand Down

0 comments on commit 08441fc

Please sign in to comment.