On Nov 12, 2013, at 10:57 PM, Igor Galić <i.ga...@brainsware.org> wrote:
> > > ----- Original Message ----- >> Updated Branches: >> refs/heads/master e754a1d0c -> 2abdac235 >> >> >> TS-2340: fix TextLogObject log rolling >> [snip] >> ---------------------------------------------------------------------- >> diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc >> index f51f4c8..a4e82c2 100644 >> --- a/proxy/InkAPI.cc >> +++ b/proxy/InkAPI.cc >> @@ -6758,6 +6758,7 @@ TSTextLogObjectCreate(const char *filename, int mode, >> TSTextLogObject *new_objec >> (bool) mode & >> TS_LOG_MODE_ADD_TIMESTAMP, >> NULL, >> Log::config->rolling_enabled, >> + >> Log::config->collation_preproc_threads, >> >> Log::config->rolling_interval_sec, >> Log::config->rolling_offset_hr, >> Log::config->rolling_size_mb)); > > Why doesn't this constructor simply take the entire Log::config ? Not sure why this was originally done like this, but IMHO this is generally a preferable pattern. By decoupling TSTextLogObject and LogConfig, you can do dependency injection for testing, and generally make it easier to use the objects in novel ways. J