]> cygwin.com Git - cygwin-apps/setup.git/blame - log.cc
2003-07-27 Robert Collins <rbtcollins@hotmail.com>
[cygwin-apps/setup.git] / log.cc
CommitLineData
89b1a15b
DD
1/*
2 * Copyright (c) 2000, Red Hat, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
11 *
12 * Written by DJ Delorie <dj@redhat.com>
13 *
14 */
15
16/* The purpose of this file is to centralize all the logging functions. */
17
b24c88b3
RC
18#if 0
19static const char *cvsid =
20 "\n%%% $Id$\n";
21#endif
89b1a15b
DD
22
23#include "win32.h"
24#include <stdio.h>
25#include <stdarg.h>
26#include <stdlib.h>
27#include <time.h>
28
29#include "resource.h"
30#include "msg.h"
31#include "log.h"
32#include "dialog.h"
33#include "state.h"
4a83b7b0 34#include "mkdir.h"
a351e48c 35#include "mount.h"
89b1a15b 36
3c054baf
RC
37#include "io_stream.h"
38
3c054baf
RC
39void
40log (enum log_level level, String const &message)
89b1a15b 41{
9f4a0c62 42 LogSingleton::GetInstance()(level) << message << endLog;
3c054baf
RC
43}
44
45void
46log (enum log_level level, const char *fmt, ...)
47{
48 char buf[1000];
49 va_list args;
50 va_start (args, fmt);
08cd08c3 51 vsnprintf (buf, 1000, fmt, args);
3c054baf 52 log (level, String(buf));
89b1a15b 53}
This page took 0.039965 seconds and 5 git commands to generate.