Comments (6)
Maybe you are looking for #31 which lets you control the log so as not to go to standard out?
from otj-pg-embedded.
I have a question close to this one.
I import last release otj-pg-embedded 0.9.0 and use slf4j+log4j2 for logging.
I'm working under Windows 10. Everything works. But tests with SingleInstancePostgresRule write corrupted charset logs in Intellij IDEA console:
2017-07-20 16:53:06.016 INFO [main][EmbeddedPostgres][EmbeddedPostgres.java:613] Detected a Windows x86_64 system
2017-07-20 16:53:06.081 INFO [main][EmbeddedPostgres][EmbeddedPostgres.java:679] Postgres binaries at C:\Users\IVANMU~1\AppData\Local\Temp\embedded-pg\PG-01856e144a4b170a72702240e1e507fe
2017-07-20 16:53:06.083 TRACE [main][EmbeddedPostgres][EmbeddedPostgres.java:124] df046e03-58ff-4572-978e-5ba427efe442 postgres data directory is C:\Users\IVANMU~1\AppData\Local\Temp\embedded-pg\df046e03-58ff-4572-978e-5ba427efe442
�����, ����������� � ���� ����, ����� ������������ ������������ "Ivan Muratov".
�� ��� ����� ����� ����� ����������� ������� �������.
������� ��� ������ ����� ��������������� � ������� "Russian_Russia.1251".
������� ������������ ���������� ������ �� ��������� "russian".
�������� ����������� ������� ������ ��������.
How can I fix this? And what's it?
from otj-pg-embedded.
I tried to change log level for EmbeddedPostgres
:
<logger name="com.opentable.db.postgres.embedded.EmbeddedPostgres" level="WARN" includeLocation="true"/>
It hides EmbeddedPostgres logs, but there is logs without logger name and my logs looks like this:
�����, ����������� � ���� ����, ����� ������������ ������������ "Ivan Muratov".
�� ��� ����� ����� ����� ����������� ������� �������.
������� ��� ������ ����� ��������������� � ������� "Russian_Russia.1251".
������� ������������ ���������� ������ �� ��������� "russian".
�������� ����������� ������� ������ ��������.
����������� ���� ��� ������������� �������� C:/Users/IVANMU~1/AppData/Local/Temp/embedded-pg/502f4f12-adcd-4837-bcd3-bf57f626cef6... ��
�������� ������������... ��
���������� �������� max_connections... 100
���������� �������� shared_buffers... 128MB
����� ���������� ������������ ����������� ������ ... windows
�������� ���������������� ������... ��
����������� ���������������� ������ ... ��
����������� �������������� ������������� ... ��
���������� ������ �� �����... ��
������. ������ �� ������ ��������� ������ ��� ������:
"C:\Users\IVANMU~1\AppData\Local\Temp\embedded-pg\PG-01856e144a4b170a72702240e1e507fe\bin\pg_ctl" -D "C:\Users\IVANMU~1\AppData\Local\Temp\embedded-pg\502f4f12-adcd-4837-bcd3-bf57f626cef6" -l logfile start
������ �����������
���������: ������� �� ���� ���������: 2017-07-21 10:34:17 MSK
���������: ������ �� ��������� ���������������� ������ ��������
���������: ������� �� ������ ��������� �����������
���������: ������� ������� ����������� ������
���������: ������� ������ �� ������� ����������
���������: ���������� ���� �������� ����������
�������� ���������� ������ �������....���������: ������� ������� ����������� �����������
ВАЖНО: закрытие подключения по команде администратора
ОПЕРАТОР: CREATE DATABASE ktrzwhnelptb OWNER postgres ENCODING = 'utf8'
���������: ����������
���������: ������� �� ���������
������
������ ����������
Process finished with exit code 0
from otj-pg-embedded.
I found the fix for that, just to force UTF-8 encoding in build.gradle
:
compileJava.options.encoding = 'UTF-8'
But I still don't know how to disable these logs like the author of issue.
from otj-pg-embedded.
@stevenschlansker Oh, thanks. That could help. As I understand there is no way to redirect the embedded postgres logging to slf4j for example. But now I can hide the log totally. It is not good, but will keep my console clean. Thanks again ☕️
from otj-pg-embedded.
slf4j redirection is not built in right now, but PRs welcome :)
from otj-pg-embedded.
Related Issues (20)
- IllegalStateException HOT 2
- No Postgres binary found for Darwin / aarch64 (Apple M1) HOT 2
- Lib not found HOT 3
- Snyk reports license warning for spotbugs-annotation dependency HOT 1
- Cannot resolve com.opentable.components:otj-spring:5.2.1 HOT 2
- Corrupted charsets in console HOT 1
- Catchpoint blog migration HOT 1
- Installed `postgres` binary is throwing segmentation fault on macOS 12.0 HOT 11
- Not working since upgrate to macOS 12 Monterey HOT 14
- PG Embedded - the Future (Update: 1.x now released) HOT 13
- M1 is not supported from the box HOT 2
- Cannot connect to database from other processes since 1.0.0 HOT 8
- The project README.md appears to have an incomplete statement HOT 3
- CurrVal function returns null in Postgres embedded db HOT 4
- Failed to build on Jenkins(docker refuses connection) HOT 3
- Unable to start postgresql on my machine HOT 2
- Can not connect to Ryuk at localhost:49163 HOT 1
- Docker environment failed issue HOT 3
- Darwin aarch64 support without Testcontainers HOT 1
- Java 8 compatibility HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from otj-pg-embedded.