@Override protected Logging featureValueOf(CiscoFamily actual) { return actual.getLogging(); } }
@Override public void exitLogging_on(Logging_onContext ctx) { Logging logging = _configuration.getCf().getLogging(); logging.setOn(!_no); }
@Override public void enterLogging_address(Logging_addressContext ctx) { if (_no) { return; } Logging logging = _configuration.getCf().getLogging(); String hostname = ctx.hostname.getText(); LoggingHost host = new LoggingHost(hostname); logging.getHosts().put(hostname, host); }
@Override public void exitLogging_server(Logging_serverContext ctx) { if (_no) { return; } Logging logging = _configuration.getCf().getLogging(); String hostname = ctx.hostname.getText(); LoggingHost host = new LoggingHost(hostname); logging.getHosts().put(hostname, host); }
@Override public void exitLogging_host(Logging_hostContext ctx) { if (_no) { return; } Logging logging = _configuration.getCf().getLogging(); String hostname = ctx.hostname.getText(); LoggingHost host = new LoggingHost(hostname); logging.getHosts().put(hostname, host); }
@Override public void exitLogging_source_interface(Logging_source_interfaceContext ctx) { if (_no) { return; } Logging logging = _configuration.getCf().getLogging(); String sourceInterface = toInterfaceName(ctx.interface_name()); logging.setSourceInterface(sourceInterface); }
@Override public void enterS_logging(S_loggingContext ctx) { if (_configuration.getCf().getLogging() == null) { _configuration.getCf().setLogging(new Logging()); } if (ctx.NO() != null) { _no = true; } }
@Override public void exitLogging_trap(Logging_trapContext ctx) { if (_no) { return; } Integer severityNum = null; String severity = null; if (ctx.logging_severity() != null) { severityNum = toLoggingSeverityNum(ctx.logging_severity()); severity = toLoggingSeverity(ctx.logging_severity()); } Logging logging = _configuration.getCf().getLogging(); LoggingType trap = logging.getTrap(); if (trap == null) { trap = new LoggingType(); logging.setTrap(trap); } trap.setSeverity(severity); trap.setSeverityNum(severityNum); }
@Override public void exitLogging_console(Logging_consoleContext ctx) { if (_no) { return; } Integer severityNum = null; String severity = null; if (ctx.logging_severity() != null) { severityNum = toLoggingSeverityNum(ctx.logging_severity()); severity = toLoggingSeverity(ctx.logging_severity()); } Logging logging = _configuration.getCf().getLogging(); LoggingType console = logging.getConsole(); if (console == null) { console = new LoggingType(); logging.setConsole(console); } console.setSeverity(severity); console.setSeverityNum(severityNum); }
c.setNtpServers(new TreeSet<>(_cf.getNtp().getServers().keySet())); if (_cf.getLogging() != null) { c.setLoggingSourceInterface(_cf.getLogging().getSourceInterface()); c.setLoggingServers(new TreeSet<>(_cf.getLogging().getHosts().keySet()));
severity = toLoggingSeverity(ctx.logging_severity()); Logging logging = _configuration.getCf().getLogging(); Buffered buffered = logging.getBuffered(); if (buffered == null) {