001/* 002 * The contents of this file are subject to the terms of the Common Development and 003 * Distribution License (the License). You may not use this file except in compliance with the 004 * License. 005 * 006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 007 * specific language governing permission and limitations under the License. 008 * 009 * When distributing Covered Software, include this CDDL Header Notice in each file and include 010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 011 * Header, with the fields enclosed by brackets [] replaced by your own identifying 012 * information: "Portions copyright [year] [name of copyright owner]". 013 * 014 * Copyright 2015-2016 ForgeRock AS. 015 */ 016package org.forgerock.audit.handlers.syslog; 017 018/** 019 * Defines the standard Syslog message facilities. 020 * 021 * @see <a href="https://tools.ietf.org/html/rfc5424#section-6.2.1">RFC-5424 section 6.2.1</a> 022 */ 023public enum Facility { 024 025 /** 026 * Kernel messages. 027 */ 028 KERN(0), 029 /** 030 * User-level messages. 031 */ 032 USER(1), 033 /** 034 * Mail system. 035 */ 036 MAIL(2), 037 /** 038 * System daemons. 039 */ 040 DAEMON(3), 041 /** 042 * Security/authorization messages. 043 */ 044 AUTH(4), 045 /** 046 * Messages generated internally by syslogd. 047 */ 048 SYSLOG(5), 049 /** 050 * Line printer subsystem. 051 */ 052 LPR(6), 053 /** 054 * Network news subsystem. 055 */ 056 NEWS(7), 057 /** 058 * UUCP subsystem. 059 */ 060 UUCP(8), 061 /** 062 * Clock daemon. 063 */ 064 CRON(9), 065 /** 066 * Security/authorization messages. 067 */ 068 AUTHPRIV(10), 069 /** 070 * FTP daemon. 071 */ 072 FTP(11), 073 /** 074 * NTP subsystem. 075 */ 076 NTP(12), 077 /** 078 * Log audit. 079 */ 080 LOGAUDIT(13), 081 /** 082 * Log alert. 083 */ 084 LOGALERT(14), 085 /** 086 * Clock daemon. 087 */ 088 CLOCKD(15), 089 /** 090 * Local use 0 (local0). 091 */ 092 LOCAL0(16), 093 /** 094 * Local use 1 (local1). 095 */ 096 LOCAL1(17), 097 /** 098 * Local use 2 (local2). 099 */ 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}