\documentclass[a4paper]{article}

\usepackage{pgfplots}

\pgfplotsset{compat=1.5}

\begin{document}




\begin{tikzpicture}
%\tracingmacros2 \tracingcommands=2
	\begin{axis}[colorbar,
		colorbar style={ymode=log,red},
	]
		\addplot[mesh,domain=1:1000] {x};
	\end{axis}
\end{tikzpicture}
\end{document}

