Sounds like you might want to pull the WriteLog stuff out into a third class, C. Give the first two classes, A and B, a has-a relationship to the new class C. If there's not too much overhead then A and B can maintain their own instances of C. If there's lots of overhead, then A and B can share a single instance of C by passing the instance reference to the constructors for A and B. Or you can make C a singleton class such that repeated calls to it's constructor yield the same object.
Matt