Skip to content

Commit 602ae99

Browse files
authored
Update README.md
1 parent 18ef9d7 commit 602ae99

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

example-project/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pip install logtail-python
1717
To run the example application, simply run the following command:
1818

1919
```bash
20-
python main.py <source-token>
20+
python example-project.py <source-token>
2121
```
2222

2323
Don't forget to replace `<source-token>` with your actual source toke which you can find in the source settings.
@@ -39,7 +39,7 @@ In this section, we will take a look at actual logging as shown in the example p
3939

4040
## Setup
4141

42-
First, we need to import the Logtail client library to our code. This can be done using the import keyword. We also need to import the default logging library as well.
42+
First, we need to import the Logtail client library to our code. This can be done using the import keyword. We also need to import the default logging library.
4343

4444
```python
4545
# Import Logtail client library and default logging library
@@ -112,7 +112,7 @@ The code above will generate the following JSON logs:
112112
"dt":"2022-02-03 12:08:55.642 UTC",
113113
"context":{
114114
"runtime":{
115-
"file_string":"main.py",
115+
"file_string":"example-project.py",
116116
"function_string":"<module>",
117117
"line_integer":"39",
118118
"logger_name_string":"__main__",
@@ -124,7 +124,7 @@ The code above will generate the following JSON logs:
124124
"process_name_string":"MainProcess"
125125
}
126126
},
127-
"filename_string":"main.py",
127+
"filename_string":"example-project.py",
128128
"level_string":"error",
129129
"message_string":"Oops! An error occured!",
130130
"severity_integer":"4"
@@ -134,7 +134,7 @@ The code above will generate the following JSON logs:
134134
"dt":"2022-02-03 12:08:55.643 UTC",
135135
"context":{
136136
"runtime":{
137-
"file_string":"main.py",
137+
"file_string":"example-project.py",
138138
"function_string":"<module>",
139139
"line_integer":"50",
140140
"logger_name_string":"__main__",
@@ -146,9 +146,9 @@ The code above will generate the following JSON logs:
146146
"process_name_string":"MainProcess"
147147
}
148148
},
149-
"filename_string":"main.py",
149+
"filename_string":"example-project.py",
150150
"level_string":"error",
151-
"message_string":"Error occurred while calling non-existing function\nTraceback (most recent call last):\n File \"main.py\", line 48, in <module>\n nonexisting_function() # Calling nonexisting function\nNameError: name 'nonexisting_function' is not defined",
151+
"message_string":"Error occurred while calling non-existing function\nTraceback (most recent call last):\n File \"example-project.py\", line 48, in <module>\n nonexisting_function() # Calling nonexisting function\nNameError: name 'nonexisting_function' is not defined",
152152
"severity_integer":"4"
153153
}
154154
```
@@ -177,7 +177,7 @@ This will generate the following JSON log:
177177
"dt":"2022-02-03 12:08:55.642 UTC",
178178
"context":{
179179
"runtime":{
180-
"file_string":"main.py",
180+
"file_string":"example-project.py",
181181
"function_string":"<module>",
182182
"line_integer":"31",
183183
"logger_name_string":"__main__",
@@ -189,7 +189,7 @@ This will generate the following JSON log:
189189
"process_name_string":"MainProcess"
190190
}
191191
},
192-
"filename_string":"main.py",
192+
"filename_string":"example-project.py",
193193
"item":{
194194
"price_float":100,
195195
"url_string":"https://fictional-store.com/item-123"

0 commit comments

Comments
 (0)