mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-22 13:35:57 +01:00
reverted some log changes and made different ones
This commit is contained in:
parent
477b23f224
commit
f4148d1b24
4 changed files with 7 additions and 11 deletions
|
@ -30,7 +30,6 @@ int main(int argc, char** argv) {
|
|||
|
||||
const int BARRET = barMainThread();
|
||||
Debug::log(BARRET == 0 ? LOG : ERR, "Bar exited with code " + std::to_string(BARRET) + "!");
|
||||
g_pWindowManager->DebugOfstream.close();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -74,8 +73,6 @@ int main(int argc, char** argv) {
|
|||
|
||||
xcb_disconnect(g_pWindowManager->DisplayConnection);
|
||||
|
||||
g_pWindowManager->DebugOfstream.close();
|
||||
|
||||
if (const auto err = xcb_connection_has_error(g_pWindowManager->DisplayConnection); err != 0) {
|
||||
Debug::log(CRIT, "Exiting because of error " + std::to_string(err));
|
||||
return err;
|
||||
|
|
|
@ -27,5 +27,9 @@ void Debug::log(LogLevel level, std::string msg) {
|
|||
printf((msg + "\n").c_str());
|
||||
|
||||
// also log to a file
|
||||
g_pWindowManager->DebugOfstream << msg << "\n";
|
||||
const std::string DEBUGPATH = ISDEBUG ? "/tmp/hypr/hyprd.log" : "/tmp/hypr/hypr.log";
|
||||
std::ofstream ofs;
|
||||
ofs.open(DEBUGPATH, std::ios::out | std::ios::app);
|
||||
ofs << msg << "\n";
|
||||
ofs.close();
|
||||
}
|
|
@ -30,10 +30,6 @@ void CWindowManager::createAndOpenAllPipes() {
|
|||
system("cat \" \" > /tmp/hypr/hyprbarout");
|
||||
system("cat \" \" > /tmp/hypr/hyprbarind");
|
||||
system("cat \" \" > /tmp/hypr/hyprbaroutd");
|
||||
|
||||
// open the debug file
|
||||
const std::string DEBUGPATH = "/tmp/hypr/hypr.log";
|
||||
DebugOfstream.open(DEBUGPATH, std::ios::out | std::ios::app);
|
||||
}
|
||||
|
||||
void CWindowManager::updateRootCursor() {
|
||||
|
@ -419,10 +415,10 @@ void CWindowManager::refreshDirtyWindows() {
|
|||
}
|
||||
|
||||
applyShapeToWindow(&window);
|
||||
|
||||
Debug::log(LOG, "Refreshed dirty window, with an ID of " + std::to_string(window.getDrawable()));
|
||||
}
|
||||
}
|
||||
|
||||
Debug::log(LOG, "Refreshed dirty windows.");
|
||||
}
|
||||
|
||||
void CWindowManager::setFocusedWindow(xcb_drawable_t window) {
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
class CWindowManager {
|
||||
public:
|
||||
std::ofstream DebugOfstream;
|
||||
xcb_connection_t* DisplayConnection = nullptr;
|
||||
xcb_ewmh_connection_t* EWMHConnection = nullptr; // Bar uses this
|
||||
xcb_screen_t* Screen = nullptr;
|
||||
|
|
Loading…
Reference in a new issue