"Using proper logging instead of print statements is a recommended practice in software development for a variety of reasons. \n",
"\n",
"While print statements can be helpful for quick debugging, logging provides a more powerful and versatile approach. \n",
"Using proper logging instead of print statements is a recommended practice.\n",
"\n",
"Logging allows for better control over output, with options to configure log levels, filter messages, and redirect output to different destinations. \n"
"While print statements can be helpful for quick debugging, logging provides a more powerful and versatile approach. Logging allows for better control over output, with options to configure log levels, filter messages, and redirect output to different destinations. \n"
]
},
{
...
...
@@ -26,13 +25,13 @@
"outputs": [],
"source": [
"import qim3d\n",
"log = qim3d.log"
"from qim3d import log"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "8a2b7c0e",
"id": "94022824",
"metadata": {},
"outputs": [
{
...
...
@@ -88,7 +87,7 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "2824aa8a",
"id": "eb542404",
"metadata": {},
"outputs": [
{
...
...
@@ -169,7 +168,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "20857afc",
"id": "eaceb5b6",
"metadata": {},
"outputs": [
{
...
...
%% Cell type:markdown id:24c15e5d tags:
%% Cell type:markdown id:ae2a75fe tags:
# Logging system for qim3d
Using proper logging instead of print statements is a recommended practice in software development for a variety of reasons.
While print statements can be helpful for quick debugging, logging provides a more powerful and versatile approach.
Using proper logging instead of print statements is a recommended practice.
Logging allows for better control over output, with options to configure log levels, filter messages, and redirect output to different destinations.
While print statements can be helpful for quick debugging, logging provides a more powerful and versatile approach. Logging allows for better control over output, with options to configure log levels, filter messages, and redirect output to different destinations.
%% Cell type:code id:a31b2245 tags:
``` python
importqim3d
log=qim3d.log
fromqim3dimportlog
```
%% Cell type:code id:8a2b7c0e tags:
%% Cell type:code id:94022824 tags:
``` python
# Here we test by sending one message for each level