Module: Skywalking::Log::Logging
- Included in:
- Environment, Plugins::PluginsManager::SWPlugin, Reporter::Client::GrpcClient::ManagementServiceGrpc, Reporter::Client::GrpcClient::TraceSegmentReportServiceGrpc, Reporter::Scheduler, Tracing::SpanContext
- Defined in:
- lib/skywalking/log/logger.rb
Instance Method Summary collapse
- #debug(msg, *args) ⇒ Object
- #error(msg, *args) ⇒ Object
- #info(msg, *args) ⇒ Object
- #log(level, msg, *args) ⇒ Object
- #warn(msg, *args) ⇒ Object
Instance Method Details
#debug(msg, *args) ⇒ Object
23 24 25 |
# File 'lib/skywalking/log/logger.rb', line 23 def debug(msg, *args) log(:debug, msg, *args) end |
#error(msg, *args) ⇒ Object
31 32 33 |
# File 'lib/skywalking/log/logger.rb', line 31 def error(msg, *args) log(:error, msg, *args) end |
#info(msg, *args) ⇒ Object
19 20 21 |
# File 'lib/skywalking/log/logger.rb', line 19 def info(msg, *args) log(:info, msg, *args) end |
#log(level, msg, *args) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/skywalking/log/logger.rb', line 35 def log(level, msg, *args) logger = Agent.logger if logger if logger.respond_to?(level) if args.empty? logger.send(level, msg) else logger.send(level, format(msg, *args)) end else Kernel.warn("Unknown log level: #{level}") end end rescue Exception => e puts "log exception: #{e.}" end |
#warn(msg, *args) ⇒ Object
27 28 29 |
# File 'lib/skywalking/log/logger.rb', line 27 def warn(msg, *args) log(:warn, msg, *args) end |