mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Logs: an ODBC log named by its data source, user and password its parameters
The string up to the first comma names an ODBC log; the user and the password are kept apart as its parameters, never shown, and do not tell logs apart. Another log or -l naming the same data source with other parameters gives them to the logger, which reconnects with them. The password is whatever follows the comma after the user. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e87ffcd7e1
commit
477a2d3822
5 files changed
+87
-28
No files matched your search
+6
-2
@@ -627,7 +627,9 @@ struct hashtable {
|
||||
|
||||
/* A log, named by the string the log command or -l gives it: "" standard
|
||||
output, "/dev/null" none, "@IDENT" syslog, "&DSN" ODBC, "radius" RADIUS
|
||||
accounting, anything else a file. One logger serves every service and
|
||||
accounting, anything else a file. For a type with parameters, ODBC, the
|
||||
string up to its first comma names the log and the rest, user and
|
||||
password, are its parameters, neither shown nor telling logs apart. One logger serves every service and
|
||||
configuration naming it the same way, and is closed once none uses it,
|
||||
the standard ones (none, standard output and error, syslog) excepted. */
|
||||
struct logtype {
|
||||
@@ -647,12 +649,14 @@ struct logtype {
|
||||
int stacksize; /* the client thread stack its writing needs */
|
||||
int standard; /* kept open for the life of the process */
|
||||
int text; /* writes a line of text: errors can go there */
|
||||
int params; /* the string after a comma is parameters */
|
||||
};
|
||||
|
||||
struct logger {
|
||||
struct logger *next;
|
||||
const struct logtype *type;
|
||||
unsigned char *selector;
|
||||
unsigned char *selector; /* the name, without parameters */
|
||||
unsigned char *params; /* what follows the name's comma, or NULL */
|
||||
void *data; /* the type's own */
|
||||
int refs;
|
||||
int errors; /* writes failed in a row */
|
||||
|
||||
Reference in new issue
Block a user