File: log.cpp

package info (click to toggle)
unrar-nonfree 1%3A7.1.8-1
  • links: PTS, VCS
  • area: non-free
  • in suites: trixie
  • size: 1,952 kB
  • sloc: cpp: 26,394; makefile: 712; sh: 11
file content (36 lines) | stat: -rw-r--r-- 549 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "rar.hpp"



void InitLogOptions(const std::wstring &LogFileName,RAR_CHARSET CSet)
{
}


void CloseLogOptions()
{
}


#ifndef SILENT
void Log(const wchar *ArcName,const wchar *fmt,...)
{
  // Preserve the error code for possible following system error message.
  int Code=ErrHandler.GetSystemErrorCode();

  uiAlarm(UIALARM_ERROR);

  va_list arglist;
  va_start(arglist,fmt);

  std::wstring s=vwstrprintf(fmt,arglist);

  ReplaceEsc(s);
  
  va_end(arglist);
  eprintf(L"%ls",s.c_str());
  ErrHandler.SetSystemErrorCode(Code);
}
#endif