[eluser]sophistry[/eluser]
thanks for the nice observation mmaruska - and on your
first post too! welcome to CI. maybe we should call it "eating your own DRY dog food"!
a reason:
it's because write_file() is in a "helper" and that would mean loading the "helper" to access the function.
another reason:
the log class was probably written first and then someone thought "we need a way to standardize filewriting" and created that helper. the helper remains because it is simple to use and understand and easy to get to. the log filewriting code remains because it is just a few lines of extra weight and means one less function call.
a thought (your thought):
the filewriting lines of write_log() method and the write_file() functions could be refactored into one function that resides in the Common.php file.
but:
the helper has a bunch of other functions to deal with files so it is a tidy and complete (modular, as it were) little pack.
the Dereks are hard at work getting to v1.6 so if you think this is a point worth stressing, now is the time to do it.
looking forward to seeing more good stuff from you!