本文整理汇总了C++中close_log函数的典型用法代码示例。如果您正苦于以下问题:C++ close_log函数的具体用法?C++ close_log怎么用?C++ close_log使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了close_log函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: main
int main(void){
int fd;
init_users();
numberOfUsers=51;
printf("%d\n",create_user(5,"HELLBOY"));
fd=open_log(21,WRITE);
write_log(fd,"Hello guys");
close_log(fd);
fd=open_log(21,READ);
read_log(fd);
close_log(fd);
return 0;
}
开发者ID:holyhope,项目名称:System,代码行数:13,代码来源:main.c
示例2: RegisterRobboTotalBases
int RegisterRobboTotalBases()
{
char DIR[1024];
Send("info string Registering TotalBases, please wait...\n");
#ifdef Log
if (WriteLog)
{
log_file = fopen(log_filename, "a");
fprintf(log_file, "info string Registering TotalBases, please wait...\n");
close_log();
}
#endif
DeRegisterRobboTotalBases();
strcpy(TotalBaseDir, TotalDir);
sprintf(DIR, "%s", TotalBaseDir);
GetTotalBase(DIR);
sprintf(DIR, "%s/3", TotalBaseDir);
GetTotalBase(DIR);
sprintf(DIR, "%s/4", TotalBaseDir);
GetTotalBase(DIR);
sprintf(DIR, "%s/5", TotalBaseDir);
GetTotalBase(DIR);
sprintf(DIR, "%s/6", TotalBaseDir);
GetTotalBase(DIR);
sprintf(DIR, "%s/51", TotalBaseDir);
GetTotalBase(DIR);
sprintf(DIR, "%s/42", TotalBaseDir);
GetTotalBase(DIR);
sprintf(DIR, "%s/33", TotalBaseDir);
GetTotalBase(DIR);
sprintf(DIR, "%s/Z", TotalBaseDir);
GetTotalBase(DIR);
sprintf(DIR, "%s/345Z", TotalBaseDir);
GetTotalBase(DIR);
sprintf(DIR, "%s/6Z", TotalBaseDir);
GetTotalBase(DIR);
Send("info string " "%d TotalBases registered\n", NumTotalBases);
#ifdef Log
if (WriteLog)
{
log_file = fopen(log_filename, "a");
fprintf(log_file, "info string " "%d TotalBases registered\n", NumTotalBases);
close_log();
}
#endif
TotalBasesLoaded = true;
return true;
}
开发者ID:Censor,项目名称:Firenzina,代码行数:51,代码来源:robbo_glue.c
示例3: main
int main(int argc, const char *argv[])
{
int i;
if (!al_init()) {
abort_example("Could not init Allegro.\n");
}
open_log_monospace();
if (argc < 2) {
for (i = 1; i < NUM_TESTS; i++) {
log_printf("# t%d\n\n", i);
all_tests[i]();
log_printf("\n");
}
}
else {
i = atoi(argv[1]);
if (i > 0 && i < NUM_TESTS) {
all_tests[i]();
}
}
close_log(true);
if (error) {
exit(EXIT_FAILURE);
}
return 0;
}
开发者ID:dradtke,项目名称:battlechess,代码行数:31,代码来源:ex_utf8.c
示例4: main
int main(int argc, char **argv)
{
int i;
if (!al_init()) {
abort_example("Could not init Allegro.\n");
}
open_log_monospace();
log_printf("%-36s %-6s %8s %8s %8s %8s\n",
"name", "flags", "ctime", "mtime", "atime", "size");
log_printf(
"------------------------------------ "
"------ "
"-------- "
"-------- "
"-------- "
"--------\n");
if (argc == 1) {
ALLEGRO_FS_ENTRY *entry = al_create_fs_entry("data");
print_entry(entry);
al_destroy_fs_entry(entry);
}
for (i = 1; i < argc; i++) {
ALLEGRO_FS_ENTRY *entry = al_create_fs_entry(argv[i]);
print_entry(entry);
al_destroy_fs_entry(entry);
}
close_log(true);
return 0;
}
开发者ID:gitustc,项目名称:d2imdev,代码行数:34,代码来源:ex_dir.c
示例5: fatal
/*
* Print error message and exit program.
*/
void
fatal(unsigned int errnum, const char *fmt,...)
{
va_list args;
list *l;
session *s;
va_start(args, fmt);
fprintf(stderr, "imapfilter: ");
vfprintf(stderr, fmt, args);
va_end(args);
if (logfp) {
va_start(args, fmt);
fprintf(logfp, "%s: ", log_time());
vfprintf(logfp, fmt, args);
fflush(logfp);
va_end(args);
}
for (l = sessions; l; l = l->next) {
s = l->data;
close_connection(s);
}
close_log();
close_debug();
exit(errnum);
}
开发者ID:Neil-Smithline,项目名称:imapfilter,代码行数:33,代码来源:log.c
示例6: acid_reload
void acid_reload(const char *reason)
{
close_log();
init_log() ;
info_log("Reload: %s\n",reason) ;
read_user_data();
}
开发者ID:bschwab,项目名称:acidblood,代码行数:7,代码来源:system.c
示例7: log_rotate
void log_rotate()
{
static char from[256];
static char to[256];
memset(from,0,256);
memset(to,0,256);
int i = LOG_ROTATE_NUMBER;
while(i){
snprintf(from, 256, "%s.%d", DEBUG_LOG_FILE, i - 1);
snprintf(to, 256, "%s.%d", DEBUG_LOG_FILE, i);
rename(from, to);
i--;
}
#ifdef __THREAD_SAFE__
//pthread_mutex_lock(&l_mutex);
#endif
close_log();
rename(DEBUG_LOG_FILE, from);
open_log();
#ifdef __THREAD_SAFE__
//pthread_mutex_unlock(&l_mutex);
#endif
}
开发者ID:selecli,项目名称:squid,代码行数:27,代码来源:log.c
示例8: main
int main(int argc, char **argv)
{
int ret = EXIT_FAILURE;
banner();
//verbose++;
if (!parse_options(argc, argv))
return ret;
check_root();
if (dump) {
efivar_bootloader_dump();
printf("\n");
return EXIT_SUCCESS;
}
init_log();
/* insure current_version is set */
if (current_version == -1)
current_version = read_version_from_subvol_file("");
ret = do_update_bootloader_pref();
close_log(ret, current_version, 0, log_bootloader_pref);
return ret;
}
开发者ID:balagopalraj,项目名称:clearlinux,代码行数:31,代码来源:update_boot_loader_pref.c
示例9: MyMultiPV
int MyMultiPV(typePos *Position, int depth)
{
int Cnt, cnt, best_value, move_is_check, new_depth, v;
typeRootMoveList *p, *q;
typeDynamic *Pos0 = Position->Dyn;
uint32 move;
int cpu, rp;
int extend, LMR, value;
int to;
int i, j, x, moveno;
int Alpha = -ValueMate, Target, Delta, Alpha2, Lower;
int GoodMoves = 0;
uint64 Nodes, NodesStore, nodes, y;
if (depth < 14)
for (i = 0; i < 0x100; i++)
MPV[i].move = MPV[i].Value = 0;
if (DoOutput && DepthInfo)
{
Send("info depth %d\n", depth >> 1);
#ifdef Log
if (WriteLog)
{
log_file = fopen(log_filename, "a");
fprintf(log_file, "info depth %d\n", depth >> 1);
close_log();
}
#endif
}
开发者ID:ZirconiumX,项目名称:Firenzina,代码行数:28,代码来源:root_multipv.c
示例10: exit_pluto
/* leave pluto, with status.
* Once child is launched, parent must not exit this way because
* the lock would be released.
*
* 0 OK
* 1 general discomfort
* 10 lock file exists
*/
void exit_pluto(int status)
{
reset_globals(); /* needed because we may be called in odd state */
free_preshared_secrets();
free_remembered_public_keys();
close_ha_iface();
delete_every_connection();
whack_attribute_finalize(); /* free in-memory pools */
fetch_finalize(); /* stop fetching thread */
free_crl_fetch(); /* free chain of crl fetch requests */
free_ocsp_fetch(); /* free chain of ocsp fetch requests */
free_authcerts(); /* free chain of X.509 authority certificates */
free_crls(); /* free chain of X.509 CRLs */
free_ca_infos(); /* free chain of X.509 CA information records */
free_ocsp(); /* free ocsp cache */
free_ifaces();
ac_finalize(); /* free X.509 attribute certificates */
scx_finalize(); /* finalize and unload PKCS #11 module */
stop_adns();
free_md_pool();
free_crypto();
free_myid(); /* free myids */
free_events(); /* free remaining events */
free_vendorid(); /* free all vendor id records */
free_builder();
delete_lock();
options->destroy(options);
pluto_deinit();
lib->plugins->unload(lib->plugins);
libhydra_deinit();
library_deinit();
close_log();
exit(status);
}
开发者ID:ramarnat,项目名称:astaro-strongswan,代码行数:42,代码来源:plutomain.c
示例11: f_atexit
/*! @brief Executed automaticaly at exit
*
* This function is executed whenever the program finished, so
* its good to do some finalization code here.
*/
void f_atexit(void)
{
close_network();
fflush(stdout);
write_log_fmt("Closing app\n");
close_log();
}
开发者ID:jjmarin,项目名称:medusa-client,代码行数:12,代码来源:main.c
示例12: main
int main(int argc, TCHAR* argv[], TCHAR* envp[])
{
HANDLE hProcess;
//取当前进程的句柄
hProcess=GetCurrentProcess();
//设置当前进程的优先级
//REALTIME_PRIORITY_CLASS--指示该进程拥有可用的最高优先级。
if(!SetPriorityClass(hProcess,REALTIME_PRIORITY_CLASS)){
return 1;
}
// create the service-object
CNetService serv;
// RegisterService() checks the parameterlist for predefined switches
// (such as -d or -i etc.; see NTService.h for possible switches) and
// starts the services functionality.
// You can use the return value from "RegisterService()"
// as your exit-code.
//2012-7-17 日志记录
logIsEnabled = __false;//__true为启动日志记录功能
open_log();
serv.RegisterService(argc, argv);
close_log();//2012-7-17 关闭日志
return 1;
}
开发者ID:george-kuo,项目名称:GoSysWare,代码行数:31,代码来源:netd.cpp
示例13: main
int main(void)
{
if (!al_init()) {
abort_example("Could not init Allegro.\n");
}
open_log_monospace();
display = al_create_display(WIDTH, HEIGHT);
if (!display) {
abort_example("al_create_display failed\n");
}
al_clear_to_color(al_map_rgb_f(0, 0, 0));
al_flip_display();
if (!al_install_keyboard()) {
abort_example("al_install_keyboard failed\n");
}
event_queue = al_create_event_queue();
if (!event_queue) {
abort_example("al_create_event_queue failed\n");
}
al_register_event_source(event_queue, al_get_keyboard_event_source());
al_register_event_source(event_queue, al_get_display_event_source(display));
main_loop();
close_log(false);
return 0;
}
开发者ID:gitustc,项目名称:d2imdev,代码行数:33,代码来源:ex_keyboard_events.c
示例14: main_int_handler
/**
* SIGINT handler for main process
*/
void main_int_handler(int arg) {
// Send SIGINT to threads, so they can close file descriptors
pthread_kill(t_id[0], SIGINT);
pthread_kill(t_id[1], SIGINT);
close_log();
exit(0);
}
开发者ID:camabeh,项目名称:isa-6in4,代码行数:10,代码来源:main.c
示例15: probe_modules_main
int probe_modules_main(int argc, char *argv[])
{
enum media_bus bus = BUS_ANY;
char *module = NULL;
char options[500] = "";
if (argc > 1) {
if (streq(argv[1], "--usb")) {
bus = BUS_USB;
} else if (!ptr_begins_static_str(argv[1], "--")) {
int i;
module = argv[1];
for (i = 2; i < argc; i++) {
strcat(options, argv[i]);
strcat(options, " ");
}
}
}
open_log();
init_modules_insmoding();
if (module) {
my_modprobe(module, ANY_DRIVER_TYPE, options);
} else {
find_media(bus);
}
close_log();
return 0;
}
开发者ID:DrakXtools,项目名称:drakx,代码行数:32,代码来源:probe-modules.cpp
示例16: main
int main(void)
{
int i;
if (!al_init()) {
abort_example("Could not init Allegro.\n");
}
al_install_keyboard();
open_log();
display = al_create_display(640, 100);
if (!display) {
abort_example("Could not create display.\n");
}
if (!al_install_audio()) {
abort_example("Could not init sound.\n");
}
al_reserve_samples(N);
al_set_mixer_postprocess_callback(al_get_default_mixer(), update_waveform, NULL);
mainloop();
close_log(false);
for (i = 0; i < N; i++) {
al_destroy_audio_stream(stream[i]);
}
al_uninstall_audio();
return 0;
}
开发者ID:gitustc,项目名称:d2imdev,代码行数:35,代码来源:ex_resample_test.c
示例17: MyRootNode
int MyRootNode(typePos *Position, int Alpha, int Beta, int depth)
{
int cpu, rp;
int Cnt, origAlpha, best_value, cnt, move_is_check, new_depth, v;
typeRootMoveList *p, *q;
typeDynamic *Pos0 = Position->Dyn;
uint32 move;
int extend, LMR;
int to, value;
uint64 Nodes, NodesStore, nodes;
if (Beta > ValueMate)
Beta = ValueMate;
if (Alpha < -ValueMate)
Alpha = -ValueMate;
if (DoOutput && DepthInfo)
{
Send("info depth %d\n", depth >> 1);
#ifdef Log
if (WriteLog)
{
log_file = fopen(log_filename, "a");
fprintf(log_file, "info depth %d\n", depth >> 1);
close_log();
}
#endif
}
开发者ID:ZirconiumX,项目名称:Firenzina,代码行数:28,代码来源:root_node.c
示例18: log_end_multiline
void
log_end_multiline(void)
{
assert(multiline != -1);
multiline = -1;
close_log();
}
开发者ID:mkohler,项目名称:amanda,代码行数:7,代码来源:logfile.c
示例19: main
int main(int argc, char *argv[])
{
log_t *log;
log = open_log(_T("-"), _T("json"));
if(log == NULL)
{
puts("Failed.");
}
open_section(log, _T("compile"));
open_item(log);
add_value(log, _T("date"), _T(__DATE__));
add_value(log, _T("time"), _T(__TIME__));
close_item(log);
open_item(log);
add_value(log, _T("file"), _T(__FILE__));
add_value(log, _T("timestamp"), _T(__TIMESTAMP__));
close_item(log);
close_section(log);
open_section(log, _T("test"));
open_item(log);
add_value(log, _T("test"), _T("field"));
close_item(log);
close_section(log);
close_log(log);
return 0;
}
开发者ID:arxopia,项目名称:hostkit,代码行数:32,代码来源:main.c
示例20: on_sigterm
static void
on_sigterm(int signo)
{
log("Terminating: SIGTERM\n");
close_log();
exit(0);
}
开发者ID:fa-de,项目名称:ddnsclient6,代码行数:7,代码来源:ddnsclient.c
注:本文中的close_log函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论