annotate seobeo/s_logging.c @ 279:b3b547563ec7

Add Google connector service and agent wiki Implement the C/Seobeo Google Drive and Gmail connector with encrypted OAuth storage, Zenbu authentication, browser testing, AI tool discovery, chunked HTTP decoding, and Bazel coverage. Consolidate repository guidance into progressive wiki documentation and enforce arena-first allocation for new first-party C code. Co-authored-by: Copilot <[email protected]> Copilot-Session: 84c338fd-0939-4bb3-b7f3-1062eb213e5d
author MrJuneJune <me@mrjunejune.com>
date Mon, 17 Aug 2026 22:22:36 -0700
parents dbf14f84d51c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
124
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
1 #include "seobeo/seobeo.h"
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
2
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
3 static char *Seobeo_Log_Level_String(Seobeo_Log_Level level)
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
4 {
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
5 switch(level)
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
6 {
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
7 case SEOBEO_DEBUG: return "DEBUG";
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
8 case SEOBEO_INFO: return "INFO";
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
9 case SEOBEO_WARNING: return "WARNING";
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
10 case SEOBEO_ERROR: return "ERROR";
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
11 default: return "INFO";
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
12 }
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
13 }
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
14
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
15 int Seobeo_Log(Seobeo_Log_Level level, const char * restrict format, ...)
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
16 {
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
17 #ifndef SEOBEO_ENABLE_DEBUG
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
18 if (level == SEOBEO_DEBUG)
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
19 return 0;
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
20 #endif
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
21
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
22 int result;
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
23 va_list args;
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
24 printf("[%s] ", Seobeo_Log_Level_String(level));
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
25 va_start(args, format);
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
26 result = vprintf(format, args);
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
27 va_end(args);
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
28
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
29 return result;
dbf14f84d51c Refactor Seobeo and mrjunejune build files so it works.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
30 }