Skip to content

LOG_INFO

Description

Writes an informational log message. Format string + args follow the StrAppendFmt placeholder vocabulary; the line lands on fd 1.

…[in] : Format string and arguments.

Success

Message formatted via a stack-local HeapAllocator and written to the normal output channel.

Failure

Formatter / FileWrite errors are dropped silently; the caller continues regardless (LOG_INFO is best-effort).

Usage example (Cross-references)

Usage examples (Cross-references)
    
                    if (fmt_info.width > var_width) {
                        LOG_INFO("Number of bytes read as raw data exceeds variable width. Excess data will discarded.");
                    }
        i64 probe = FileSeek(file, 0, FILE_SEEK_CUR);
        if (probe < 0 || fd == 0 || fd == 1 || fd == 2) {
            LOG_INFO("Reading from non-seekable channel.");
            char buf_byte = 0;
            while (FileRead(file, &buf_byte, 1) == 1) {
            }
    
            LOG_INFO("User skipped reading of '{}' field in JSON object.", key);
    
            StrDeinit(&key);
            Zstr        end = HttpRequestParse(&req, (Zstr)StrBegin(&raw));
            if (end == StrBegin(&raw)) {
                LOG_INFO("[{}] (unparseable request, {} bytes)", client_addr, (u64)prefix_len);
            } else {
                Zstr method = "?";
                        break;
                }
                LOG_INFO("[{}] {} {}", client_addr, method, req.url);
            }
            HttpRequestDeinit(&req);
            log_request_summary(StrBegin(&peer_str), first, (size)first_n);
        } else {
            LOG_INFO("[{}] (request larger than {} bytes, not logging line)", peer_str, (u64)sizeof(first));
        }
            }
    
            LOG_INFO("beam listening on {} → upstream {}", listen_spec, upstream_spec);
    
            while (!g_stop) {
            }
    
            LOG_INFO("beam shutting down");
            ListenerClose(&listener);
        }
                    }                                                                                                      \
                                                                                                                           \
                    LOG_INFO("User skipped reading of '{}' field in JSON object.", key);                                   \
                    si = UNPL(read_si);                                                                                    \
                }                                                                                                          \
Last updated on