1 /* 2 * The contents of this file are subject to the terms of the Common Development and 3 * Distribution License (the License). You may not use this file except in compliance with the 4 * License. 5 * 6 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 7 * specific language governing permission and limitations under the License. 8 * 9 * When distributing Covered Software, include this CDDL Header Notice in each file and include 10 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 11 * Header, with the fields enclosed by brackets [] replaced by your own identifying 12 * information: "Portions copyright [year] [name of copyright owner]". 13 * 14 * Copyright 2015-2016 ForgeRock AS. 15 */ 16 package org.forgerock.audit.handlers.syslog; 17 18 /** 19 * Defines the standard Syslog message facilities. 20 * 21 * @see <a href="https://tools.ietf.org/html/rfc5424#section-6.2.1">RFC-5424 section 6.2.1</a> 22 */ 23 public enum Facility { 24 25 /** 26 * Kernel messages. 27 */ 28 KERN(0), 29 /** 30 * User-level messages. 31 */ 32 USER(1), 33 /** 34 * Mail system. 35 */ 36 MAIL(2), 37 /** 38 * System daemons. 39 */ 40 DAEMON(3), 41 /** 42 * Security/authorization messages. 43 */ 44 AUTH(4), 45 /** 46 * Messages generated internally by syslogd. 47 */ 48 SYSLOG(5), 49 /** 50 * Line printer subsystem. 51 */ 52 LPR(6), 53 /** 54 * Network news subsystem. 55 */ 56 NEWS(7), 57 /** 58 * UUCP subsystem. 59 */ 60 UUCP(8), 61 /** 62 * Clock daemon. 63 */ 64 CRON(9), 65 /** 66 * Security/authorization messages. 67 */ 68 AUTHPRIV(10), 69 /** 70 * FTP daemon. 71 */ 72 FTP(11), 73 /** 74 * NTP subsystem. 75 */ 76 NTP(12), 77 /** 78 * Log audit. 79 */ 80 LOGAUDIT(13), 81 /** 82 * Log alert. 83 */ 84 LOGALERT(14), 85 /** 86 * Clock daemon. 87 */ 88 CLOCKD(15), 89 /** 90 * Local use 0 (local0). 91 */ 92 LOCAL0(16), 93 /** 94 * Local use 1 (local1). 95 */ 96 LOCAL1(17), 97 /** 98 * Local use 2 (local2). 99 */ 100 LOCAL2(18), 101 /** 102 * Local use 3 (local3). 103 */ 104 LOCAL3(19), 105 /** 106 * Local use 4 (local4). 107 */ 108 LOCAL4(20), 109 /** 110 * Local use 5 (local5). 111 */ 112 LOCAL5(21), 113 /** 114 * Local use 6 (local6). 115 */ 116 LOCAL6(22), 117 /** 118 * Local use 7 (local7). 119 */ 120 LOCAL7(23); 121 122 private final int code; 123 124 Facility(int code) { 125 this.code = code; 126 } 127 128 /** 129 * Get the syslog code for the facility. 130 * @return The code. 131 */ 132 public int getCode() { 133 return code; 134 } 135 }