Logarithmic Operators and the W-Algebra