Method: Rbeapi::Api::Logging#set_time_stamp_units
- Defined in:
- lib/rbeapi/api/logging.rb
#set_time_stamp_units(opts = {}) ⇒ Boolean
set_time_stamp_units configures the global logging time_stamp_units If the default keyword is specified and set to true, then the configuration is defaulted using the default keyword. The default keyword option takes precedence over the enable keyword if both options are specified.
Commands
logging format timestamp <traditional|high-resolution>
no logging format timestamp <level>
default logging format timestamp
303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/rbeapi/api/logging.rb', line 303 def set_time_stamp_units(opts = {}) unit_map = { 'traditional' => ' traditional', 'seconds' => ' traditional', 'high-resolution' => ' high-resolution', 'milliseconds' => ' high-resolution' } units = '' units = unit_map[opts[:units]] if opts[:units] cmd = "logging format timestamp#{units}" cmd = command_builder(cmd, opts) configure cmd end |