Questions
Find answers to frequently asked development questions. For information about Better Stack products, explore our docs.
How To Whitelist Better Stack IPs in UFW
Learn how to whitelist Better Stack IPs on UFW and prevent any false incident alerting.
How To Whitelist Better Stack IPs in Digital Ocean
Learn how to whitelist Better Stack IPs on Digital Ocean and prevent any false incident alerting.
How To Whitelist Better Stack IPs and User Agent in Cloudflare
Learn how to whitelist Better Stack IPs on Cloudflare and prevent any false incident alerting.
How To Write Logs To A File With Python?
If you are new to logging in Python, please feel free to start with our Introduction to Python logging to get started smoothly. Otherwise, here is how to write logs to a file in Python: Using Basic...
How To Use Logging In Multiple Modules?
It's recommended to have a logger defined in each module like this: import logging logger = logging.getLogger(name) Then in your main program, do the following: import logging.config logging.config...
How To Log Uncaught Exceptions In Python?
For this, you can use the sys.excepthook that allows us to attach a handler for any unhandled exception: Creating a logger logger = logging.getLogger(name) logging.basicConfig(filename='example.log...
How to Log to Stdout with Python?
If you are new to logging in Python, please feel free to start with our Introduction to Python logging to get started smoothly. Otherwise, here is how to log to Stdout with Python: Using Basic Conf...
How to log data as JSON with Python
How to Log Data As JSON With Python? The simplest way is to use a custom module.
How To Log All Requests From The Python Request Library?
If you are new to logging in Python, please feel free to start with our Introduction to Python logging to get started smoothly. Otherwise, here is how to log all requests from the python request li...
How To Disable Logging While Running Django Unit Tests?
By Disabling Tests At The Start Of The Application Suppose you want to do it the quick way. In that case, the following line of code will disable any log messages less severe or equal to CRITICAL: ...
How To Disable Logging From The Python Request Library?
You can change the log level of the logger taking care of these messages. Setting the level to WARNING will remove the request messages and keep warnings and errors: import logging logging.getLogge...
How To Color Python Logging Output?
If you are new to logging in Python, please feel free to start with our Introduction to Python logging to get started smoothly. Otherwise, here is how to color python logging output: 🔭 Want to cent...
Is Postfix the same thing as Sendmail?
No, Postfix and Sendmail are not the same thing, although they serve a similar purpose. Both are Mail Transfer Agents (MTAs), which are responsible for routing and delivering email messages between...
What ports to open for a mail server?
To set up a mail server, you'll need to open specific ports to allow incoming and outgoing mail traffic. The ports you need to open depend on the email protocols you plan to use. The most common em...
How can I speed up a MySQL restore from a dump file?
Restoring a MySQL database from a dump file can be a time-consuming process, especially if the dump file is large. To speed up the restoration process, you can consider the following strategies: Op...
How can I do a dump of only the table structure in PostgreSQL?
To perform a dump of only the table structure (schema) in PostgreSQL, you can use the pg_dump command with the --schema-only option. Here's how to do it: pgdump --schema-only -t yourtablename yourd...
How To Backup "crontab -e" Files?
To backup the crontab entries that you've edited using the crontab -e command, you can use several methods. Here are a couple of approaches: Step 1 - Use the crontab Command to Export to a File You...
SQL Server (2005/2008): Does full backup truncate the log in full recovery mode
In SQL Server, when a database is in the Full Recovery Mode, taking a full backup does not automatically truncate the transaction log. The transaction log is a critical component of SQL Server's da...
What exactly will --delete-excluded do for rsync?
The --delete-excluded option in rsync specifies that you want to delete files from the destination that are excluded from the synchronization. It has a specific behavior when combined with the --ex...
Linux - What directories should I exclude when backing up a server?
When backing up a Linux server, it's important to be selective about which directories you include in your backup and which directories you exclude. The choice of directories to exclude depends on ...
Make your mark
Join the writer's program
Are you a developer and love writing and sharing your knowledge with the world? Join our guest writing program and get paid for writing amazing technical guides. We'll get them to the right readers that will appreciate them.
Write for us
Build on top of Better Stack
Write a script, app or project on top of Better Stack and share it with the world. Make a public repository and share it with us at our email.
community@betterstack.comor submit a pull request and help us build better products for everyone.
See the full list of amazing projects on github
Thank you to everyone who
Here is to all the fantastic people that are contributing and sharing their amazing projects: Thank you!