Skip to content

Commit

Permalink
Update token env var to be less ambiguous
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-robertson committed Jan 18, 2017
1 parent 504da73 commit 13de9f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions logentrus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ func init() {
logrus.SetFormatter(&logrus.TextFormatter{}) // You an use any formatter; LogentriesHook will always format as JSON without interfering with your other hooks

hook, err := logentrus.New(
os.Getenv("TOKEN"), // fetching token from env vars here. You can make a token in your logentries account and are expected to have 1 token for each application
"Jan 2 15:04:05", // timeFormat could be an empty string instead; doing so will default to logrus's typically time format.
logrus.InfoLevel, // log level is inclusive. Setting to logrus.ErrorLevel, for example, would include errors, panics, and fatals, but not info or debug.
nil, // setting config to nil means that conn will use root certs already set up on local system
os.Getenv("LOGENTRIESTOKEN"), // fetching token from env vars here. You can make a token in your logentries account and are expected to have 1 token for each application
"Jan 2 15:04:05", // timeFormat could be an empty string instead; doing so will default to logrus's typically time format.
logrus.InfoLevel, // log level is inclusive. Setting to logrus.ErrorLevel, for example, would include errors, panics, and fatals, but not info or debug.
nil, // setting config to nil means that conn will use root certs already set up on local system
)
if err != nil {
panic(err)
Expand Down

0 comments on commit 13de9f2

Please sign in to comment.