(Explicit) Tauberian theorems: removing $(\log x/n)$ Say that $\{a_n\}_{n\geq 1}$, $|a_n|\leq 1$, are such that $$\left|\sum_{n\leq x} a_n \log \frac{x}{n}\right|\leq \epsilon x\quad\text{for all $x\geq x_0$.}$$ What sort of bound can we deduce on $S(x)=\sum_{n\leq x} a_n$?

Naïve answer.
It is easy to give a simple bound:
since, for $y>1$, $$\begin{aligned}
\left|\sum_{n\leq x y} a_n \log \frac{x y}{n} 
- \sum_{n\leq x/y} a_n \log \frac{x/y}{n} 
\right.&\left. 
- 2 (\log y) \sum_{n\leq x} a_n\right| \\
&=
\left|\sum_{x/y < n\leq x y} a_n \log \frac{x y}{n}\right|\\
&= \left|\sum_{x/y < n\leq x y} \log \frac{x y}{n}\right|\\
&\leq \int_{x/y}^{x y} \log \frac{x y}{t} dt + \log y^2 \\
&= \left(y-\frac{1}{y}\right) x - \left(\frac{x}{y}-1\right) \log y^2,
\end{aligned}$$
we know that, for $x\geq x_0/y$, assuming $y\leq x/e$,
$$\frac{1}{x}\left|\sum_{n\leq x} a_n\right|\leq \frac{\epsilon}{2 \log y} \left(y + \frac{1}{y}\right) + \frac{y - \frac{1}{y}}{\log y} - \frac{2}{ y} +\frac{2}{x}.$$
Writing $y = \exp(\delta)$, we easily see that the leading term of the right side is $\epsilon/\delta + 2 \delta$. Hence, setting $\delta = \sqrt{\epsilon/2}$ and thus obtain that $|S(x)|$ is at most roughly $\sqrt{8 \epsilon}\cdot x$.

Now, that is not just a simple bound, but a downright simple-minded one. Can one do better?
 A: $\newcommand\ep\epsilon$You cannot improve the upper bound $c\sqrt\ep\,x$ on $|S(x)|$ (where $c>0$ is a universal real constant factor) by more than a universal positive real constant factor.
Indeed, take any $\ep\in(0,1/4)$ and let
$$a_n:=\sum_{j\ge1}(-1)^j1(c^{j-1}<n<c^j),\quad c:=e^{\sqrt\ep}.$$
Let
\begin{equation}
    T(x):=\sum_{n\le x} a_n\ln\frac{x}n. 
\end{equation}
Let $h(u):=1-u+u\ln u\sim(1-u)^2/2$ as $u\to1$.
Then for natural $k\to\infty$
\begin{equation}
\begin{aligned}
T(c^k)
&= \sum_{j\le k}(-1)^j\sum_{c^{j-1}<n<c^j}\ln\frac{c^k}n \\ 
&= \sum_{j\le k}(-1)^j\Big(o(c^k/k)+\int_{c^{j-1}<n<c^j}\ln\frac{c^k}n\,dn\Big) \\ 
&=o(c^k)+ \sum_{j\le k}(-1)^j[c^j h(c)+(c^j-c^{j-1})(k-j)\ln c] \\ 
&=o(c^k)+ \sum_{j\le k}(-1)^j c^j\ep[1/2+(k-j)+O(\ep)] \\ 
&=O(c^k\ep). 
\end{aligned}   
\end{equation}
Note that, for $x$ between $c^{k-1}$ and $c^k$, we have $T(x)$ between $T(c^{k-1})$ and $T(c^k)$.
It follows that for $x\to\infty$
\begin{equation}
    \sum_{n\le x} a_n\ln\frac{x}n=T(x)=O(x\ep),
\end{equation}
as required.
On the other hand, for natural $j$ and $x=c^{j-1}$,
$$|S(cx)-S(x)|=\sum_{c^{j-1}<n<c^j}1
\asymp\sqrt\ep\,c^{j-1}=\sqrt\ep\,x,
$$
so that the upper bound $\asymp\sqrt\ep\,x$ on $|S(x)|$ cannot be improved,
as was claimed.
