src/agent/UstRouter/LogSink.h in passenger-5.0.24 vs src/agent/UstRouter/LogSink.h in passenger-5.0.25

- old
+ new

@@ -1,8 +1,8 @@ /* * Phusion Passenger - https://www.phusionpassenger.com/ - * Copyright (c) 2010-2015 Phusion Holding B.V. + * Copyright (c) 2010-2016 Phusion Holding B.V. * * "Passenger", "Phusion Passenger" and "Union Station" are registered * trademarks of Phusion Holding B.V. * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -26,13 +26,13 @@ #ifndef _PASSENGER_UST_ROUTER_LOG_SINK_H_ #define _PASSENGER_UST_ROUTER_LOG_SINK_H_ #include <boost/shared_ptr.hpp> #include <cstddef> +#include <cassert> #include <ev++.h> #include <jsoncpp/json.h> -#include <UstRouter/DataStoreId.h> #include <Utils/JsonUtils.h> namespace Passenger { namespace UstRouter { @@ -98,14 +98,13 @@ virtual bool isRemote() const { return false; } - virtual void append(const DataStoreId &dataStoreId, - const StaticString &data) - { + virtual void append(const TransactionPtr &transaction) { + assert(!transaction->isDiscarded()); lastWrittenTo = ev_now(Controller_getLoop(controller)); - totalBytesWritten += data.size(); + totalBytesWritten += transaction->getBody().size(); } virtual bool flush() { lastFlushed = ev_now(Controller_getLoop(controller)); return true;