WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 4566561

Browse files
committed
Update README.md
1 parent 8ce41da commit 4566561

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ angular-logger has optional dependencies on _[momentjs](https://github.com/momen
5454
<a name='bower'/>
5555
#### Bower
5656

57-
Will be implemented under [issue #1](https://github.com/better-js-logging/angular-logger/issues/1)
57+
bower install angular-logger --save
5858

5959
<a name='manually'/>
6060
#### Manually
@@ -64,7 +64,7 @@ Include _angular-logger.js_, _[momentjs](https://github.com/moment/moment)_ and
6464
<a name='getting-started'/>
6565
## Getting Started
6666

67-
1. After installing, add `logger` module as a dependency to your module:
67+
1. After installing, add the `angular-logger` module as a dependency to your module:
6868

6969
```javascript
7070
angular.module('YourModule', ['angular-logger'])
@@ -120,12 +120,12 @@ logEnhancerProvider.prefixPattern = '%2$s: '; // context by index
120120
logEnhancerProvider.prefixPattern = '%2$s - %1$s: '; // both, reversed
121121
```
122122

123-
This works, because angular-logger will use two arguments for the prefix, which can be referenced by index.
123+
This works because angular-logger will use two arguments context and timestamp for the prefix, which can be referenced by index.
124124

125125
<a name='datetime-stamp-patterns'/>
126126
#### Datetime stamp patterns
127127

128-
If you have included _moment.js_ in your webapp, you can start using datetime stamp patterns with angular-logger. The default pattern is `dddd h:mm:ss a`, which translates to _Sunday 12:55:07 am_. You customize the pattern as follows:
128+
If you have included _moment.js_ in your webapp, you can start using datetime stamp patterns with angular-logger. The default pattern is `LLL`, which translates to a localized string that matches the current user's Locale. You customize the pattern as follows:
129129

130130
```javascript
131131
app.config(function (logEnhancerProvider) {
@@ -138,7 +138,7 @@ app.run(function($log) {
138138
// became: Sunday::[app]>Hello World
139139
```
140140

141-
This way you can switch to a 24h format this way as well, for example, or use your locale-specific format.
141+
A pattern like `try dddd h:mm:ss a` would translate to something like "Sunday 12:55:07 am". You can easily switch to a 24h format as well, using these patterns.
142142

143143
* For all options, see [moment.js](http://momentjs.com/docs/#/displaying/)
144144

@@ -186,7 +186,7 @@ logger.warn("Or combine all!: %s, %j", JSON.stringify(obj), obj, obj);
186186

187187
Using logging levels, we can manage output on several levels. Contexts can be named using dot '.' notation, where the names before dots are intepreted as groups or packages.
188188

189-
For example for `'a.b'` and `a.c` we can define a general log level for `a` and have a different log level for only 'a.c'.
189+
For example for `a.b` and `a.c` we can define a general log level for `a` and have a different log level for only `a.c`.
190190

191191
The following logging functions (left side) are available:
192192

0 commit comments

Comments
 (0)