fastflowtransform.logging¶
bind_context ¶
bind_context(*, run_id=None, engine=None, env=None, node=None)
Bind fields that get injected into every record.
Source code in src/fastflowtransform/logging.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |
clear_context ¶
clear_context()
Clear all bound fields.
Source code in src/fastflowtransform/logging.py
93 94 95 96 97 98 | |
bound_context ¶
bound_context(*, run_id=None, engine=None, env=None, node=None)
Temporarily bind (or override) selected fields. Only 'node' is auto-cleared on exit; other fields persist unless you pass new values.
Source code in src/fastflowtransform/logging.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | |
set_flags ¶
set_flags(*, debug=None, sql_debug=None)
Set runtime flags (thread/task-local).
Source code in src/fastflowtransform/logging.py
125 126 127 128 129 130 | |
setup ¶
setup(*, level=_logging.INFO, json=False, to_stderr=False, propagate_sql=False)
Configure the 'fastflowtransform' logging tree. Idempotent: previous console handlers installed by this function are removed.
Source code in src/fastflowtransform/logging.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | |
setup_from_cli_flags ¶
setup_from_cli_flags(*, verbose=0, quiet=0, json=False, sql_debug=False, to_stderr=False)
Convenience for CLI
quiet >=1 → ERROR verbose=0 → WARNING verbose=1 → INFO verbose>=2 → DEBUG
Source code in src/fastflowtransform/logging.py
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | |
get_logger ¶
get_logger(name=None)
Return a namespaced logger under 'fastflowtransform'. get_logger() → 'fastflowtransform' get_logger("sql") → 'fastflowtransform.sql' get_logger("cli.run") → 'fastflowtransform.cli.run'
Source code in src/fastflowtransform/logging.py
268 269 270 271 272 273 274 275 276 | |
echo ¶
echo(message='', *, prefix=True, **kwargs)
Thin wrapper around typer.echo(...) that prepends the global log prefix.
Usage
echo("hello") echo("to stderr", err=True) echo("no newline", nl=False) echo("colored", color=True) echo("raw message", prefix=False) # skip prefix if needed
Source code in src/fastflowtransform/logging.py
279 280 281 282 283 284 285 286 287 288 289 290 291 | |
echo_debug ¶
echo_debug(message='', *, prefix=True, **kwargs)
Like echo(...), but only emits when fastflowtransform logger is in DEBUG.
Usage
echo_debug("SQL preview:", sql_text) echo_debug("to stderr only in debug", err=True)
Source code in src/fastflowtransform/logging.py
294 295 296 297 298 299 300 301 302 303 304 | |
debug ¶
debug(msg, *args, **kwargs)
General debug; gated by runtime flag OR logger level.
Source code in src/fastflowtransform/logging.py
319 320 321 322 | |
dprint ¶
dprint(*parts)
Lightweight stdout debugging; useful for quick probes during dev. Only prints when general debug is enabled.
Source code in src/fastflowtransform/logging.py
325 326 327 328 329 330 331 332 333 | |
sql_debug ¶
sql_debug(msg, *args, **kwargs)
Single-line SQL debug; appears only when SQL debug is enabled.
Source code in src/fastflowtransform/logging.py
336 337 338 339 | |
sql_block ¶
sql_block(title, lines)
Pretty multi-line SQL preview gated by SQL debug.
Source code in src/fastflowtransform/logging.py
342 343 344 345 346 347 348 349 350 | |