README.md in logdna-1.0.5 vs README.md in logdna-1.0.6
- old
+ new
@@ -53,20 +53,15 @@
}
To send logs, use "log" method.
- require 'logdna'
-
- logger = LogDNA::Ruby.new(your_ingestion_key, options)
- => #<Logdna::Ruby:0x00000000000000>
-
logger.log('This is my first log')
=> "Saved" # Saved to buffer. Ready to be flushed automatically
-By default, it will log at the level of "INFO" unless you specified otherwise during initialzation of the logger.
+By default, it will log at the level of "INFO" unless you specified otherwise during the initialzation of the logger.
You can change a particular message's log level.
logger.log('This is warn message', {:level => "WARN"})
@@ -75,10 +70,24 @@
logger.log('This is a message with metadata', {:meta => {:once => {:first => "nested1", :another => "nested2"}}, :level => "TRACE"})
Hostname and app name cannot be more than 80 characters.
-You can search logs by environment in a form of 'env:staging' or '_env:staging' in logdna search bar.
+This logger extends the standard Ruby logger and inherits some of the conventions from it.
+
+ logger.info('This is info log') # same as logger.log('This is info message', {:level => "INFO"})
+ logger.info? => true
+ logger.trace('trace log')
+ logger.error('error log')
+
+You can also set logger level, environment, app name this way:
+
+ logger.env = 'PRODUCTION'
+ logger.app = 'NEW APP NAME'
+ logger.level = 'FATAL'
+ logger.level = Logger::FATAL
+
+
# Important Notes
1. This logger assumes that you pass in json formatted data