fastflowtransform.logging¶
bind_context ¶
bind_context(*, run_id=None, engine=None, env=None, node=None, invocation_id=None)
Bind fields that get injected into every record.
Source code in src/fastflowtransform/logging.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | |
clear_context ¶
clear_context()
Clear all bound fields.
Source code in src/fastflowtransform/logging.py
98 99 100 101 102 103 | |
bound_context ¶
bound_context(*, run_id=None, engine=None, env=None, node=None, invocation_id=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
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |
set_flags ¶
set_flags(*, debug=None, sql_debug=None)
Set runtime flags (thread/task-local).
Source code in src/fastflowtransform/logging.py
137 138 139 140 141 142 | |
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
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 226 227 228 229 230 231 232 233 234 235 236 | |
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
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | |
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
279 280 281 282 283 284 285 286 287 | |
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
290 291 292 293 294 295 296 297 298 299 300 301 302 | |
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
305 306 307 308 309 310 311 312 313 314 315 | |
debug ¶
debug(msg, *args, **kwargs)
General debug; gated by runtime flag OR logger level.
Source code in src/fastflowtransform/logging.py
330 331 332 333 | |
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
336 337 338 339 340 341 342 343 344 | |
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
347 348 349 350 | |
sql_block ¶
sql_block(title, lines)
Pretty multi-line SQL preview gated by SQL debug.
Source code in src/fastflowtransform/logging.py
353 354 355 356 357 358 359 360 361 | |