Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximper-welcome
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
ximper-welcome
Commits
3d70d388
Commit
3d70d388
authored
Feb 19, 2024
by
Sophie Herold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
logging: Add compatibility with G_MESSAGES_DEBUG
The env var G_MESSAGES_DEBUG is supported by tools like Builder and by most of GNOME Core apps. So also adding support here.
parent
1acb7db4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
main.rs
src/main.rs
+7
-1
No files found.
src/main.rs
View file @
3d70d388
...
@@ -10,7 +10,13 @@ use application::Application;
...
@@ -10,7 +10,13 @@ use application::Application;
use
config
::{
GETTEXT_PACKAGE
,
LOCALEDIR
};
use
config
::{
GETTEXT_PACKAGE
,
LOCALEDIR
};
fn
main
()
->
glib
::
ExitCode
{
fn
main
()
->
glib
::
ExitCode
{
env_logger
::
init
();
let
mut
log_builder
=
env_logger
::
builder
();
// Compatibility G_MESSAGES_DEBUG env var
if
!
glib
::
log_writer_default_would_drop
(
glib
::
LogLevel
::
Debug
,
Some
(
"gnome_tour"
))
{
log_builder
.filter_module
(
"gnome_tour"
,
log
::
LevelFilter
::
Debug
);
}
log_builder
.init
();
// Prepare i18n
// Prepare i18n
setlocale
(
LocaleCategory
::
LcAll
,
""
);
setlocale
(
LocaleCategory
::
LcAll
,
""
);
bindtextdomain
(
GETTEXT_PACKAGE
,
LOCALEDIR
)
bindtextdomain
(
GETTEXT_PACKAGE
,
LOCALEDIR
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment