17c478bd9Sstevel@tonic-gate /* 2*9525b14bSRao Shoaib * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") 37c478bd9Sstevel@tonic-gate * Copyright (c) 1996-1999 by Internet Software Consortium. 47c478bd9Sstevel@tonic-gate * 57c478bd9Sstevel@tonic-gate * Permission to use, copy, modify, and distribute this software for any 67c478bd9Sstevel@tonic-gate * purpose with or without fee is hereby granted, provided that the above 77c478bd9Sstevel@tonic-gate * copyright notice and this permission notice appear in all copies. 87c478bd9Sstevel@tonic-gate * 9*9525b14bSRao Shoaib * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES 10*9525b14bSRao Shoaib * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11*9525b14bSRao Shoaib * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR 12*9525b14bSRao Shoaib * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13*9525b14bSRao Shoaib * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14*9525b14bSRao Shoaib * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 15*9525b14bSRao Shoaib * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 167c478bd9Sstevel@tonic-gate */ 177c478bd9Sstevel@tonic-gate 187c478bd9Sstevel@tonic-gate #ifndef LOGGING_P_H 197c478bd9Sstevel@tonic-gate #define LOGGING_P_H 207c478bd9Sstevel@tonic-gate 217c478bd9Sstevel@tonic-gate typedef struct log_file_desc { 227c478bd9Sstevel@tonic-gate char *name; 237c478bd9Sstevel@tonic-gate size_t name_size; 247c478bd9Sstevel@tonic-gate FILE *stream; 257c478bd9Sstevel@tonic-gate unsigned int versions; 267c478bd9Sstevel@tonic-gate unsigned long max_size; 277c478bd9Sstevel@tonic-gate uid_t owner; 287c478bd9Sstevel@tonic-gate gid_t group; 297c478bd9Sstevel@tonic-gate } log_file_desc; 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gate typedef union log_output { 327c478bd9Sstevel@tonic-gate int facility; 337c478bd9Sstevel@tonic-gate log_file_desc file; 347c478bd9Sstevel@tonic-gate } log_output; 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gate struct log_channel { 37*9525b14bSRao Shoaib int level; /*%< don't log messages > level */ 387c478bd9Sstevel@tonic-gate log_channel_type type; 397c478bd9Sstevel@tonic-gate log_output out; 407c478bd9Sstevel@tonic-gate unsigned int flags; 417c478bd9Sstevel@tonic-gate int references; 427c478bd9Sstevel@tonic-gate }; 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gate typedef struct log_channel_list { 457c478bd9Sstevel@tonic-gate log_channel channel; 467c478bd9Sstevel@tonic-gate struct log_channel_list *next; 477c478bd9Sstevel@tonic-gate } *log_channel_list; 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gate #define LOG_BUFFER_SIZE 20480 507c478bd9Sstevel@tonic-gate 517c478bd9Sstevel@tonic-gate struct log_context { 527c478bd9Sstevel@tonic-gate int num_categories; 537c478bd9Sstevel@tonic-gate char **category_names; 547c478bd9Sstevel@tonic-gate log_channel_list *categories; 557c478bd9Sstevel@tonic-gate int flags; 567c478bd9Sstevel@tonic-gate int level; 577c478bd9Sstevel@tonic-gate char buffer[LOG_BUFFER_SIZE]; 587c478bd9Sstevel@tonic-gate }; 597c478bd9Sstevel@tonic-gate 607c478bd9Sstevel@tonic-gate #endif /* !LOGGING_P_H */ 61*9525b14bSRao Shoaib /*! \file */ 62