Defines | Functions | Variables

logcat.cc File Reference

Contains main function definition for logcat. More...

#include "ink_config.h"
#include "ink_file.h"
#include "I_Layout.h"
#include "I_Version.h"
#include <poll.h>
#include "LogStandalone.cc"
#include "LogAccess.h"
#include "LogField.h"
#include "LogFilter.h"
#include "LogFormat.h"
#include "LogFile.h"
#include "LogHost.h"
#include "LogObject.h"
#include "LogConfig.h"
#include "LogBuffer.h"
#include "LogUtils.h"
#include "LogSock.h"
#include "LogPredefined.h"
#include "Log.h"
Include dependency graph for logcat.cc:

Go to the source code of this file.

Defines

#define PROGRAM_NAME   "traffic_logcat"
#define MAX_LOGBUFFER_SIZE   65536

Functions

static int process_file (int in_fd, int out_fd)
static int open_output_file (char *output_file)
int main (int, char *argv[])

Variables

static int version_flag = 0
static int help = 0
static int squid_flag = 0
static int follow_flag = 0
static int clf_flag = 0
static int elf_flag = 0
static int elf2_flag = 0
static int auto_filenames = 0
static int overwrite_existing_file = 0
static char output_file [1024]
int auto_clear_cache_flag = 0
static const ArgumentDescription argument_descriptions []
static const char * USAGE_LINE = "Vw2] [input-file ...]"

Detailed Description

Contains main function definition for logcat.

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file logcat.cc.


Define Documentation

#define MAX_LOGBUFFER_SIZE   65536

Definition at line 29 of file logcat.cc.

#define PROGRAM_NAME   "traffic_logcat"

Definition at line 28 of file logcat.cc.

Referenced by main().


Function Documentation

int main ( int  ,
char *  argv[] 
)
static int open_output_file ( char *  output_file  )  [static]

Definition at line 187 of file logcat.cc.

References overwrite_existing_file.

Referenced by main().

static int process_file ( int  in_fd,
int  out_fd 
) [static]

Variable Documentation

Initial value:
 {

  {"output_file", 'o', "Specify output file", "S1023", &output_file, NULL, NULL},
  {"auto_filenames", 'a', "Automatically generate output names",
   "T", &auto_filenames, NULL, NULL},
  {"follow", 'f', "Follow the log file as it grows", "T", &follow_flag, NULL, NULL},
  {"clf", 'C', "Convert to Common Logging Format", "T", &clf_flag, NULL, NULL},
  {"elf", 'E', "Convert to Extended Logging Format", "T", &elf_flag, NULL, NULL},
  {"help", 'h', "Give this help", "T", &help, NULL, NULL},
  {"squid", 'S', "Convert to Squid Logging Format", "T", &squid_flag, NULL, NULL},
  {"debug_tags", 'T', "Colon-Separated Debug Tags", "S1023", error_tags, NULL, NULL},
  {"version", 'V', "Print Version Id", "T", &version_flag, NULL, NULL},
  {"overwrite_output", 'w', "Overwrite existing output file(s)", "T",
   &overwrite_existing_file, NULL, NULL},
  {"elf2", '2', "Convert to Extended2 Logging Format", "T", &elf2_flag, NULL,
   NULL}
}

Definition at line 62 of file logcat.cc.

Referenced by main(), and CommandLineArgs::parse_arguments().

Definition at line 60 of file logcat.cc.

int auto_filenames = 0 [static]

Definition at line 57 of file logcat.cc.

Referenced by main().

int clf_flag = 0 [static]

Definition at line 54 of file logcat.cc.

Referenced by process_file().

int elf2_flag = 0 [static]

Definition at line 56 of file logcat.cc.

Referenced by process_file().

int elf_flag = 0 [static]

Definition at line 55 of file logcat.cc.

Referenced by process_file().

int follow_flag = 0 [static]

Definition at line 53 of file logcat.cc.

Referenced by main(), and process_file().

int help = 0 [static]

Definition at line 51 of file logcat.cc.

Referenced by main().

char output_file[1024] [static]

Definition at line 59 of file logcat.cc.

Referenced by main().

int overwrite_existing_file = 0 [static]

Definition at line 58 of file logcat.cc.

Referenced by open_output_file().

int squid_flag = 0 [static]

Definition at line 52 of file logcat.cc.

Referenced by process_file().

const char* USAGE_LINE = "Vw2] [input-file ...]" [static]

Definition at line 80 of file logcat.cc.

Referenced by main().

int version_flag = 0 [static]

Definition at line 50 of file logcat.cc.

Referenced by main().