MCPcopy Index your code
hub / github.com/assaultcube/AC / clientlogf

Function clientlogf

source/src/console.cpp:101–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99int clientloglinesremaining = INT_MAX;
100
101void clientlogf(const char *s, ...)
102{
103 defvformatstring(sp, s, s);
104 filtertext(sp, sp, FTXT__LOG);
105 extern struct servercommandline scl;
106 const char *ts = scl.logtimestamp ? timestring(true, "%b %d %H:%M:%S ") : "";
107 char *p, *l = sp;
108 do
109 { // break into single lines first
110 if((p = strchr(l, '\n'))) *p = '\0';
111 printf("%s%s\n", ts, l);
112 if(clientlogfile)
113 {
114 clientlogfile->printf("%s%s\n", ts, l);
115 if(--clientloglinesremaining <= 0) DELETEP(clientlogfile);
116 }
117 else if(bootclientlog) cvecprintf(*bootclientlog, "%s%s\n", ts, l);
118 l = p + 1;
119 }
120 while(p);
121}
122SVAR(conline,"n/a");
123void conoutf(const char *s, ...)
124{

Callers 15

getlistindexFunction · 0.85
sethomedirFunction · 0.85
addpackagedirFunction · 0.85
parsemessagesFunction · 0.85
loopvFunction · 0.85
mitemsliderMethod · 0.85
entropy_initFunction · 0.85
addigraphFunction · 0.85
scripterrFunction · 0.85
unpackheaderextraFunction · 0.85
load_worldFunction · 0.85

Calls 4

filtertextFunction · 0.85
cvecprintfFunction · 0.85
timestringFunction · 0.70
printfMethod · 0.45

Tested by

no test coverage detected