# encoding: UTF-8 # frozen_string_literal: true require 'nrser/refinements/types' using NRSER::Types # Namespace # ======================================================================= module Locd module CLI module Command # Definitions # ======================================================================= class RotateLogs < Job desc "add [OPTIONS] [-- CMD_TEMPLATE...]", "Add the rotate-logs agent" include_shared t[ groups: t.has_any( :add, :respond_with_agents ) ] def add agent = agent_class.add **option_kwds( groups: [ :write, :add ] ) logger.info "#{ agent_class.name } `#{ agent.label }` created." agent.reload if options[:load] respond agent end end # class RotateLogs # /Namespace # ======================================================================= end # module Command end # module CLI end # module Locd