Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ configure it with an inputToken, which is done via the LogglyLoggerProvider:
```javascript
angular.module( 'myApp', ['logglyLogger'] )

.config( function( LogglyLoggerProvider ) {
.config(["LogglyLoggerProvider", function( LogglyLoggerProvider ) {
LogglyLoggerProvider.inputToken( '<loggly input token here>' );
} );
} ]);

.run( function( LogglyLogger, $log ) {
.run(["LogglyLogger", "$log", function( LogglyLogger, $log ) {

//This will be sent to both the console and Loggly
$log.info( "I'm a little teapot." );

//This will be sent to loggly only
LogglyLogger.sendMessage( 'Short and Stout.' )
}
}])

```

Expand Down Expand Up @@ -130,7 +130,7 @@ will include the key/values provided with all messages, plus the data to be sent
Extra fields can also be added at runtime using the `LogglyLogger` service:

```javascript
app.controller( 'MainCtrl', function( $scope, $log, LogglyLogger ) {
app.controller( 'MainCtrl', ["$scope", "$log", "LogglyLogger", function( $scope, $log, LogglyLogger ) {

logglyLogger.fields( { username: "foobar" } );

Expand All @@ -139,7 +139,7 @@ Extra fields can also be added at runtime using the `LogglyLogger` service:
$log.info( 'All is good!' );

>> { appVersion: 1.1.0, browser: 'Chrome', username: 'foobar', level: 'WARN', message: 'All is good', url: 'http://google.com' }
}
}])

```

Expand Down