Let $X$ be a smooth complex projective algebraic variety and $E$ a line bundle on $X$. It is a classical result that if $E$ carries an integrable connection, then the first Chern class $c\_1(E)$ vanishes. I am interesting in the following variant: let $D$ be a normal crossing divisor and $\nabla: E \to E \otimes \Omega^1\_X(\log D)$ an integrable connection with logarithmic singularities along $D$. Denote 
$$
\mathrm{Res}\_{D\_i} \nabla
$$ the residue of $\nabla$ at an irreducible component $D\_i$ of $D$. As $E$ has rank one, it can be identified with a complex number. 


**Proposition**. One has $c\_1(E)=-\sum\_i \mathrm{Res}\_{D\_i} \nabla \cdot [D\_i]$


Could anybody explain me how to prove such a result? 



Chern class of a logarithmic connection
More generally, for a vector bundle $E$ consider a short exact sequence
$$0\rightarrow End(E)\otimes\Omega^1\rightarrow End(E)\otimes \Omega^1(D)\rightarrow End(E)\otimes \mathcal{O}\_D\rightarrow 0,$$
where the rightmost map is the residue. Then the residue of a connection gives a well-defined class in $H^0(X, End(E)\otimes\mathcal{O}\_D)$ and its image under the connecting homomorphism $H^0(X, End(E)\otimes\mathcal{O}\_D)\rightarrow H^1(X, End(E)\otimes\Omega^1)$ is minus the Atiyah class $a(E)$, i.e. the class of the Atiyah sequence
$$0\rightarrow End(E)\rightarrow \mathcal{A}\_E\rightarrow T\_X\rightarrow 0,$$
where $\mathcal{A}\_E$ is the bundle of first-order differential operators on $E$.


One can compute Chern classes by
$$c\_k(E) = \frac{(-1)^k}{k!} tr(a(E)^{\wedge k}).$$
For instance, you get the formula for the first Chern class of a line bundle you wrote above.


The very first claim is an easy exercise in Cech cohomology and can be found in Appendix B in H. Esnault, E. Viehweg, Logarithmic De Rham complexes and vanishing theorems, Invent. Math. 86, 161-194.


