tools/thermal/lib/log.h
Source file repositories/reference/linux-study-clean/tools/thermal/lib/log.h
File Facts
- System
- Linux kernel
- Corpus path
tools/thermal/lib/log.h- Extension
.h- Size
- 1059 bytes
- Lines
- 32
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
syslog.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#ifndef __THERMAL_TOOLS_LOG_H
#define __THERMAL_TOOLS_LOG_H
#include <syslog.h>
#ifndef __maybe_unused
#define __maybe_unused __attribute__((__unused__))
#endif
#define TO_SYSLOG 0x1
#define TO_STDOUT 0x2
#define TO_STDERR 0x4
extern void logit(int level, const char *format, ...);
#define DEBUG(fmt, ...) logit(LOG_DEBUG, "%s:%d: " fmt, __func__, __LINE__, ##__VA_ARGS__)
#define INFO(fmt, ...) logit(LOG_INFO, fmt, ##__VA_ARGS__)
#define NOTICE(fmt, ...) logit(LOG_NOTICE, fmt, ##__VA_ARGS__)
#define WARN(fmt, ...) logit(LOG_WARNING, fmt, ##__VA_ARGS__)
#define ERROR(fmt, ...) logit(LOG_ERR, fmt, ##__VA_ARGS__)
#define CRITICAL(fmt, ...) logit(LOG_CRIT, fmt, ##__VA_ARGS__)
#define ALERT(fmt, ...) logit(LOG_ALERT, fmt, ##__VA_ARGS__)
#define EMERG(fmt, ...) logit(LOG_EMERG, fmt, ##__VA_ARGS__)
int log_init(int level, const char *ident, int options);
int log_str2level(const char *lvl);
void log_exit(void);
#endif
Annotation
- Immediate include surface: `syslog.h`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.