Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jacek99 committed Sep 5, 2016
1 parent 07426f8 commit ca1d754
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ important) and we will log its root cause message and the entire exception stack
} catch (Exception e) {
log.error("Error occcurred during batch processing",
"user",securityContext.getPrincipal().getName(),
"tenanId",securityContext.getTenantId(),
"tenanId",securityContext.getTenantId(),
e);
}

which would generate a log message like:

Error occurreded during batch processing [email protected] tenantId=SOME_TENANT_ID errorMessage="ORA-14094: Oracle Hates You"
Error occurred during batch processing [email protected] tenantId=SOME_TENANT_ID errorMessage="ORA-14094: Oracle Hates You"
...followed by regular full stack trace of the exception...

## Enforcing custom logging format per object
Expand Down Expand Up @@ -95,14 +95,14 @@ You can mix and match all of these together without any issues:

} catch (Exception e) {
log.error("Error occcurred during batch processing",
securityContext,
e,
securityContext,
e,
"hostname", InetAddress.getLocalHost().getHostName());
}

and you would get:

Error occurreded during batch processing [email protected] tenantId=SOME_TENANT_ID errorMessage="ORA-14094: Oracle Hates You" hostname=DEV_SERVER1
Error occurred during batch processing [email protected] tenantId=SOME_TENANT_ID errorMessage="ORA-14094: Oracle Hates You" hostname=DEV_SERVER1
...followed by regular full stack trace of the exception...

# License
Expand Down

0 comments on commit ca1d754

Please sign in to comment.