Skip to content

Commit

Permalink
v2.0.3
Browse files Browse the repository at this point in the history
 - Compatibility with `[email protected]`
 - Fix #4 , thanks to @znewsham
 - Fix #3 , thanks to @mploquin
  • Loading branch information
dr-dimitru committed Aug 1, 2017
1 parent c449bcb commit 2db5ee8
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 38 deletions.
46 changes: 24 additions & 22 deletions .versions
Original file line number Diff line number Diff line change
@@ -1,49 +1,51 @@
[email protected].5
babel-compiler@6.18.2
[email protected].6
babel-compiler@6.19.4
[email protected]
[email protected]
[email protected]
blaze@2.1.9
blaze@2.3.2
[email protected]
boilerplate-generator@1.0.11
boilerplate-generator@1.1.1
[email protected]
[email protected]
ddp@1.2.5
ddp-client@1.3.4
[email protected].8
ddp-server@1.3.14
ddp@1.3.0
ddp-client@2.0.0
[email protected].9
ddp-server@2.0.0
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
local-test:ostrio:[email protected].2
local-test:ostrio:[email protected].3
[email protected]
meteor@1.6.1
minimongo@1.0.23
modules@0.8.2
modules-runtime@0.7.10
[email protected].17
meteor@1.7.0
minimongo@1.2.1
modules@0.9.2
modules-runtime@0.8.0
[email protected].19
[email protected]
[email protected]
[email protected]
[email protected]
ostrio:[email protected].2
[email protected].8
ostrio:[email protected].3
[email protected].9
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].13
spacebars-compiler@1.0.13
[email protected].15
spacebars-compiler@1.1.2
[email protected]
[email protected]
[email protected].12
[email protected].13
[email protected]
[email protected].15
[email protected].17
[email protected]
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,9 @@ log.rule('AdapterName', {
server: true /* Calls from client will be executed on Server */
});
```

Support this project:
========
This project can't be possible without [ostr.io](https://ostr.io).

By using [ostr.io](https://ostr.io) you are not only [protecting domain names](https://ostr.io/info/domain-names-protection), [monitoring websites and servers](https://ostr.io/info/monitoring), using [Prerendering for better SEO](https://ostr.io/info/prerendering) of your JavaScript website, but support our Open Source activity, and great packages like this one are available for free.
30 changes: 15 additions & 15 deletions logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ let _inst = 0;
*/
class Logger {
constructor() {
this.userId = new ReactiveVar(null);
this.prefix = ++_inst;
this.userId = new ReactiveVar(null);
this.prefix = ++_inst;
this._rules = {};
this._emitters = [];

if (Meteor.isClient) {
if (Package && Package['accounts-base']) {
Accounts.onLogin(() => {
const _accounts = (Package && Package['accounts-base'] && Package['accounts-base'].Accounts) ? Package['accounts-base'].Accounts : undefined;
if (_accounts) {
_accounts.onLogin(() => {
this.userId.set(Meteor.userId());
});

Accounts.onLogout(() => {
_accounts.onLogout(() => {
this.userId.set(null);
});
}
}

this._emitters = [];
this._rules = {};
}

/*
Expand Down Expand Up @@ -109,25 +109,25 @@ class Logger {
filter: Match.Optional([String])
});

if (!_.isArray(options.filter) || _.isEmpty(options.filter)) {
options.filter = ['*'];
}

if (options.filter) {
for (let j = 0; j < options.filter.length; j++) {
options.filter[j] = options.filter[j].toUpperCase();
}
}

if (!options.filter) {
options.filter = ['*'];
}

if (!options.client) {
if (!_.isBoolean(options.client)) {
options.client = false;
}

if (!options.server) {
if (!_.isBoolean(options.server)) {
options.server = true;
}

if (!options.enable) {
if (!_.isBoolean(options.enable)) {
options.enable = true;
}

Expand Down
2 changes: 1 addition & 1 deletion package.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package.describe({
name: 'ostrio:logger',
version: '2.0.2',
version: '2.0.3',
summary: 'Logging: isomorphic driver with support of MongoDB, File (FS) and Console',
git: 'https://github.com/VeliovGroup/Meteor-logger',
documentation: 'README.md'
Expand Down

0 comments on commit 2db5ee8

Please sign in to comment.