mirror of
https://github.com/plausible/analytics.git
synced 2024-12-25 10:33:01 +03:00
Log write buffer as info
This commit is contained in:
parent
5d1dc0d27c
commit
b76f5e728a
@ -22,7 +22,7 @@ defmodule Plausible.Event.WriteBuffer do
|
||||
new_buffer = [ event | buffer ]
|
||||
|
||||
if length(new_buffer) >= @max_buffer_size do
|
||||
Logger.debug("Buffer full, flushing to disk")
|
||||
Logger.info("Buffer full, flushing to disk")
|
||||
Process.cancel_timer(state[:timer])
|
||||
flush(new_buffer)
|
||||
new_timer = Process.send_after(self(), :tick, @flush_interval_ms)
|
||||
@ -46,7 +46,7 @@ defmodule Plausible.Event.WriteBuffer do
|
||||
end
|
||||
|
||||
defp insert_events(events) do
|
||||
Logger.debug("Flushing #{length(events)} events")
|
||||
Logger.info("Flushing #{length(events)} events")
|
||||
insert = """
|
||||
INSERT INTO events (name, timestamp, domain, user_id, hostname, pathname, referrer, referrer_source, initial_referrer, initial_referrer_source, country_code, screen_size, browser, operating_system)
|
||||
VALUES
|
||||
|
@ -22,7 +22,7 @@ defmodule Plausible.Session.WriteBuffer do
|
||||
new_buffer = [ session | buffer ]
|
||||
|
||||
if length(new_buffer) >= @max_buffer_size do
|
||||
Logger.debug("Buffer full, flushing to disk")
|
||||
Logger.info("Buffer full, flushing to disk")
|
||||
Process.cancel_timer(state[:timer])
|
||||
flush(new_buffer)
|
||||
new_timer = Process.send_after(self(), :tick, @flush_interval_ms)
|
||||
@ -46,7 +46,7 @@ defmodule Plausible.Session.WriteBuffer do
|
||||
end
|
||||
|
||||
defp insert_sessions(sessions) do
|
||||
Logger.debug("Flushing #{length(sessions)} sessions")
|
||||
Logger.info("Flushing #{length(sessions)} sessions")
|
||||
insert = """
|
||||
INSERT INTO sessions (domain, user_id, hostname, start, is_bounce, entry_page, exit_page, referrer, referrer_source, country_code, screen_size, browser, operating_system)
|
||||
VALUES
|
||||
|
Loading…
Reference in New Issue
Block a user